package Day001_继承_抽象类.抽象类;

public abstract class Animal {
    private String name;
    private int age;

    public Animal() {
    }

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void show() {
        System.out.println(name);
        System.out.println(age);
    }

    // 抽象方法
    // 修饰符 abstract 返回值类型 方法名(形参列表);
    public abstract void eat();
    public abstract void sleep();
}
